import { getCurrentInstance } from 'vue'

export const useRouter = () => {
  const instance = getCurrentInstance()
  const router = (instance!.proxy as any).$router
  return router
}

// export const router = useRouter()

export const useRoute = () => {
  const instance = getCurrentInstance()
  const route = (instance!.proxy as any).$route
  return route
}

// export const route = useRoute()
